package com.jyx.manage_cms;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableDiscoveryClient
@EntityScan("com.jyx.framework.domain.cms") //页面实体类
@ComponentScan(basePackages = {"com.jyx.api"})  //扫描接口
@ComponentScan(basePackages = {"com.jyx.manage_cms"})  //扫描本项目所有类
public class JyxCmsManageApplication {
    public static void main(String[] args) {
        SpringApplication.run(JyxCmsManageApplication.class,args);
    }

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate(new OkHttp3ClientHttpRequestFactory());
    }
}
